﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DelonixRegiaHMSys.Core.Interfaces;
using DelonixRegiaHMSys.Core.Models;

namespace DelonixRegiaHMSys.Core.Services
{
    public class rrServices
    {
        private readonly IRoomReservationQuery _roomReservationQuery;
        public rrServices(IRoomReservationQuery roomReservationQuery)
        {
            _roomReservationQuery = roomReservationQuery;
        }
        //public IEnumerable<RoomReservation> GetAll()
        //{
        //    return _roomReservationQuery.GetAll();
        //}

        public IEnumerable<RoomReservation> GetReservationbyGuestID(string guestID, DateTime date)
        {
            return _roomReservationQuery.GetReservationbyGuestID(guestID, date);
        }

        public void AddRoomReservation(RoomReservation rr)
        {
            _roomReservationQuery.AddRoomReservation(rr);
        }

        public void UpdateRoomReservation(RoomReservation rr)
        {
            _roomReservationQuery.UpdateRoomReservation(rr);
        }

        public void DeleteRoomReservation(string reservationID)
        {
            _roomReservationQuery.DeleteRoomReservation(reservationID);
        }

        public bool ReservationRecordAdded(string reservationID)
        {
            return _roomReservationQuery.ReservationRecordAdded(reservationID);
        }

        public bool RoomReservationTodayExist(string guestID)
        {
            return _roomReservationQuery.RoomReservationTodayExist(guestID);
        }
    }
}
